package edu.washington.cs.pomdb.gui;

import java.awt.Component;


import javax.swing.JPanel;

import edu.washington.cs.pomdb.User;
import edu.washington.cs.pomdb.ExpCtrl.*;
/**
 * @author Yanping Huang
 *
 */
public class GUI {
	
	
	public static String getUserName(){
    	LoginWindow login = new LoginWindow();  	
   		return login.getUserName(); 
	}
	
	public static boolean showUserStat(String prefix, User u){
		UserStatFrame uf = new UserStatFrame(prefix, u);
		return uf.isContinued();
	}

	public static Actions showObservation(Observations o, String s, double r){
		ObservationFrame of = new ObservationFrame(o,s,r);
		return of.getAction();
	}
	
	
	public static boolean showTrialResult(boolean answer, double reward, double balance){
		TrialReportFrame tf = new TrialReportFrame(answer, reward, balance);
		return tf.isContinued();
	}


	
	
	
	/** Add Component Without a Layout Manager (Absolute Positioning) */
	static void addComponent(JPanel p, Component c,int x,int y,int width,int height)
	{
		c.setBounds(x,y,width,height);
		p.add(c);
	}
}
